package top.tenebrous.yzl.instance;

/**
 * @Description:
 * @Project: jestic-server
 * @Package: com.tenebrous.jestic.server
 * @Author: zhangya
 * @CreateTime: 2023-06-03  14:00
 * @Version: 1.0.0
 */
public interface EditableInstanceContext {

    /**
     * @description:
     * 注册实例
     *
     * @author: zhangya
     * @date: 2023/6/4 10:01
     * @param:
     * @return:
     **/
    void registerInstance(Instance instance);

    /**
     * @description:
     * 刷新实例
     *
     * @author: zhangya
     * @date: 2023/6/4 10:00
     * @param:
     * @return:
     **/
    void flushInstance(Instance instance);

    /**
     * @description:
     * 刷新到 instanceMap 按服务分类
     *
     * @author: zhangya
     * @date: 2023/6/4 10:03
     * @param:
     * @return:
     **/
    void flushInstanceMap(Instance instance);

    /**
     * @description:
     * 刷新到 instances 按服务分类
     *
     * @author: zhangya
     * @date: 2023/6/4 10:03
     * @param:
     * @return:
     **/
    void flushInstances(Instance instance);

    /**
     * @description:
     * 刷新到 instancesEnvMap 按服务分类
     *
     * @author: zhangya
     * @date: 2023/6/4 10:03
     * @param:
     * @return:
     **/
    void flushInstanceEnvMap(Instance instance);

    /**
     * @description:
     * 重置实例，将实例刷新到原始状态
     * 但是实例状态依然为健康状态
     *
     * @author: zhangya
     * @date: 2023/6/5 15:57
     * @param:
     * @return:
     **/
    Instance resettingInstance(Instance instance);

}
